#pragma once

class IKernel;
extern IKernel* g_Kernel;

class IThread;
class IMutex;
class ITimer;

class IKernel
{
public:
	IKernel(void);
	virtual ~IKernel(void);

	virtual void		CreateGameWindow(const std::string& title, uint width, uint height, bool fullscreen, bool vsync) = 0;
	virtual void		SwapBuffers() = 0;

	virtual inline uint	GetTicks() = 0;
	virtual inline void	Delay(int miliseconds) = 0;

	virtual float		GetDeltaTime() = 0;

	virtual void		RegisterThread(IThread* thread) = 0;
	virtual void		UnregisterThread(IThread* thread) = 0;

	virtual void		InifityLoop() = 0;
	virtual void		LockThread(IThread* thread) = 0;
	virtual void		StopThreads() = 0;

	virtual ITimer*		CreateNewTimer() = 0;
	virtual IMutex*		CreateNewMutex() = 0;

	virtual void		Close() = 0;

	static void			CreateInstance();
	static void			DestroyInstance();
};

